<?php echo $tema['Tema']['nombre']?>

<div class="related">
	<h3><?php __('Related Topicos');?></h3>
	<?php if (!empty($tema['Topico'])):?>
	<table cellpadding = "0" cellspacing = "0">
	<tr>
		<th><?php __('Titulo'); ?></th>
		<th><?php __('Fecha'); ?></th>
		<th><?php __('Creado Por'); ?></th>
		<th class="actions"><?php __('Actions');?></th>
	</tr>
	<?php
		$i = 0;
		foreach ($tema['Topico'] as $topico):
			$class = null;
			if ($i++ % 2 == 0) {
				$class = ' class="altrow"';
			}
		?>
		<tr<?php echo $class;?>>
			<td><?php echo $topico['titulo'];?></td>
			<td><?php echo $topico['fecha'];?></td>
			<td><?php echo $usuario[$topico['topico']];?></td>
			<td class="actions">
				<?php echo $html->link(__('View', true), array('controller'=> 'topicos', 'action'=>'view', $topico['topico'])); ?>
				<?php echo $html->link(__('Edit', true), array('controller'=> 'topicos', 'action'=>'edit', $topico['topico'])); ?>
				<?php echo $html->link(__('Delete', true), array('controller'=> 'topicos', 'action'=>'delete', $topico['topico']), null, sprintf(__('Are you sure you want to delete # %s?', true), $topico['topico'])); ?>
			</td>
		</tr>
	<?php endforeach; ?>
	</table>
<?php endif; ?>



<div class="actions">
	<ul>
		
		<li><?php echo $html->link(__('Edit Tema', true), array('action'=>'edit', $tema['Tema']['tema'])); ?> </li>
		<li><?php echo $html->link(__('Delete Tema', true), array('action'=>'delete', $tema['Tema']['tema']), null, sprintf(__('Are you sure you want to delete # %s?', true), $tema['Tema']['tema'])); ?> </li>
		<li><?php echo $html->link(__('List Temas', true), array('action'=>'index')); ?> </li>
		<li><?php echo $html->link(__('New Tema', true), array('action'=>'add')); ?> </li>
	</ul>
</div>
